//
//  TTJSONWebService.m
//  Tint
//
//  Created by Kevin Wu on 2/29/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TTJSONWebService.h"

@implementation TTJSONWebService



#pragma mark - Override

- (id)objectToBeParsed:(NSData *)data {
    if (data != nil) {
        NSError *error = nil;
        id object = [data objectFromJSONDataWithParseOptions:JKParseOptionStrict error:&error];
        
        if (error != nil) {
            return [NSError errorWithDomain:TTTintErrorDomain description:@"JSON data invalid"];
        } else {
            return object;
        }
        
    }
    return nil;
}

@end
